package pers.zh.parking.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pers.zh.parking.dao.EvaluationMapper;
import pers.zh.parking.po.Evaluation;

import java.util.List;

@Service
public class EvalService implements IEvalService {

    @Autowired
    EvaluationMapper mapper;

    @Override
    public List<Evaluation> getEvals(Integer userId) {
        return mapper.getEvals(userId);
    }

    @Override
    public boolean update(Evaluation evaluation) {
        evaluation.setEvalStatus(2);
        return mapper.update(evaluation) > 0;
    }
}
